/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lucava.metamodel.uspeed;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author glenn
 */
public class RelationFactory {

    private static Map<String, String> types = new HashMap<String, String>();

    static {
        RelationFactory.types.put("<>", "aggregation");
        RelationFactory.types.put("<+", "composition");
        RelationFactory.types.put("--", "association");
        RelationFactory.types.put("<-", "dependency");
    }

    /**
     * Construction d'une relation selon le symbole Uspeed
     *
     * @param relationSymb
     * @return
     */
    public static RelationElement build(String relationSymb) {
        RelationElement elt = new RelationElement();
        elt.setType(RelationFactory.types.get(relationSymb));
        return elt;

    }
}
